package com.laborder.sysyy.dao;
import com.laborder.sysyy.entity.Announce;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
/**
 * @Function: 公告Dao接口
 * @author: 786107529@qq.com FJL
 * @date:2018/9/8 17:26
 */
@Repository
@Mapper
public interface AnnounceDaoMapper {
	 
	/**
	 * @Function: 分页查询
	 * @author: 786107529@qq.com FJL
	 * @date:2018/9/8 17:26
	 */
	 List<Announce> findAnnounceWithPage(Map<String, Object> map);
/**
 * @Function: 查询总数
 * @author: 786107529@qq.com FJL
 * @date:2018/9/8 17:27
 */
	 int getAnnounceCount(Map<String, Object> map);
	/**
	 * @Function: 添加公告
	 * @author: 786107529@qq.com FJL
	 * @date:2018/9/8 17:27
	 */
	int saveAnnounceInfo(Announce announce);
	 /**
	  * @Function: 修改公告
	  * @author: 786107529@qq.com FJL
	  * @date:2018/9/8 17:28
	  */
	 int updateAnnounceInfo(Announce announce);
	 /**
	  * @Function: 根据Id删除
	  * @author: 786107529@qq.com FJL
	  * @date:2018/9/8 17:28
	  */
	 int delAnnounceInfo(int aId);
	 /**
	  * @Function: 根据Id
	  * @author: 786107529@qq.com FJL
	  * @date:2018/9/8 17:28
	  */
	 Announce getAnnounceByIdInfo(int aId);
	 /**
	   * @function: 根据名称和内容查重
	   * @author: 759057893@qq.com lyz
	   * @date: 2019/1/16 14:57
	   */
	Announce getAnnounceInfoByName(@Param("aName")String aName, @Param("aDesc")String  aDesc);

}
